﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication4
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            RangeValidator2.MaximumValue = DateTime.Now.ToString();
        }

        protected void TextBox2_TextChanged(object sender, EventArgs e)
        {

        }

        protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
        {
            if (args.Value=="admin")
            {
                args.IsValid = false;

            }
            else
            {
                args.IsValid = true;
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if ( IsValid==true)
            {
                Label1.Text = "注册成功！<a href='/WebForm2.aspx'>点击跳转登录页面</a>";
               
            }
         
            {
                //Label2.Text = "<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox1.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox1.Text= "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox2.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox3.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox4.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox5.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox6.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
                //TextBox7.Text = "注册成功！<a href='/WebForm3.aspx'>点击跳转登录页面</a>";
            }
        }
    }
}